import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-task-header',
  templateUrl: './task-header.component.html',
  styleUrls: ['./task-header.component.scss']
})
export class TaskHeaderComponent implements OnInit {
  @Input()
  header: string;
  name: string;
  @Output()
  taskCreated: EventEmitter<void> = new EventEmitter<void>();
  @Output()
  moveClicked: EventEmitter<void> = new EventEmitter<void>();
  @Output()
  delBtnClicked = new EventEmitter<void>();
  constructor() { }

  ngOnInit() {
    this.name = this.header;
  }
  openCreateTaskDialog(e) {
    this.taskCreated.emit();
  }
  onMoveClick($event) {
    this.moveClicked.emit();
  }
  onDelBtnClick(e) {
    this.delBtnClicked.emit();
  }
}
